#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
#include<sys/types.h>
#include<sys/wait.h>
int main()
{
  printf("old process doing...\n");
  pid_t pid = fork();
  if(pid == 0)
  {
    printf("I am child doing .....\n");
    //execl("/usr/bin/ls","ls","-l","-a",NULL);
    //execl("./mytestcx","mytestcx",NULL);
   // execlp("./mytestcx","mytestcx",NULL);
  // execlp("ls","ls","-la",NULL); 
    char* const argv[] = {"./mytestcx"};
    char* const env[] = {"mytest = aaaaaaaaaaaaa","guofei = sbbbbbbbbbbbbb"};
    execve("./mytestcx",argv,env);





  }


  waitpid(pid,NULL,0);
  printf("new process doint...\n");

  return 0;
}
